package com.cd.music.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * @author yxl 余秀良
 * @version 1.0
 * @description: 广告实体类
 * @date 2018年03月06日  下午10:02
 * @address: 四川成都
 */
@Entity
@Table
public class Advertising {
    /**
     * id
     */
    @Id
    @Column(nullable = false, unique = true, length = 32)
    private String id;
    /**
     * 图片
     */
    @Column(nullable = false, columnDefinition = "longtext not null")
    private String image;
    /**
     * 图片链接地址
     */
    private String url;
    /**
     * 创建时间
     */
    @Column(columnDefinition = "datetime default now()")
    private Date createTime;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Date getCreateTime() {
        return createTime != null ? (Date) createTime.clone() : null;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime != null ? (Date) createTime.clone() : null;
    }

}
